projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52ede69
)
lib/pull: Simplify a for-loop initialisation
author
Philip Withnall
<withnall@endlessm.com>
Wed, 7 Jun 2017 13:46:15 +0000
(14:46 +0100)
committer
Atomic Bot
<atomic-devel@projectatomic.io>
Wed, 7 Jun 2017 16:55:35 +0000
(16:55 +0000)
It’s a bit neater to initialise the loop iterator and maximum in the
same place.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #911
Approved by: cgwalters
src/libostree/ostree-repo-pull.c
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-repo-pull.c
b/src/libostree/ostree-repo-pull.c
index 0585eb91b16f9344c23146abc6dc9a9b7451a8c5..d1826117b689a777f8b36a812a6c8c52c199aa1b 100644
(file)
--- a/
src/libostree/ostree-repo-pull.c
+++ b/
src/libostree/ostree-repo-pull.c
@@
-3174,8
+3174,7
@@
ostree_repo_pull_with_options (OstreeRepo *self,
if (pull_data->summary)
{
refs = g_variant_get_child_value (pull_data->summary, 0);
- n = g_variant_n_children (refs);
- for (i = 0; i < n; i++)
+ for (i = 0, n = g_variant_n_children (refs); i < n; i++)
{
const char *refname;
g_autoptr(GVariant) ref = g_variant_get_child_value (refs, i);